home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
2716B.ZIP
/
SMUTIL.EXE
/
SAMPLE.SMF
< prev
next >
Wrap
Text File
|
1990-10-14
|
5KB
|
126 lines
Anatomy of a SUPER-MAINT make file
----------------------------------
Here are the two macro sets used by this particular file (we are only
compiling in one language (C), so we use that set of macros and the
linker set of macros. Chapter 3 explains a macro set.
L1CO = -c
L1M1 = -AS
L1M2 = -AM
L1M3 = -AL
L1ND =
L1D = -Zi -Od
L1F1 =
L1F2 =
L2CO =
L2M1 =
L2M2 =
L2M3 =
L2ND =
L2D = -Zi
L2F1 =
L2F2 =
LNCO =
LNM1 =
LNM2 =
LNM3 =
LNND = /E
LND = /CO
LNF1 = /NOE
LNF2 = /ST:25000
CPY = SAMPLE.C+SAMPLE1.C+SAMPLEA.ASM
TNAMES =
SAMPLE.OBJ&
SAMPLE1.OBJ&
SAMPLEA.OBJ
As long as notes don't have any of the symbols used in macros or action
blocks in them, they don't need any special symbols or formatting. Also,
NOTES MUST NOT BE ON THE SAME LINE WITH A MACRO OR ACTION BLOCK.
SAMPLE.OBJ: C:\CODE\SAMPLE.C
CL $(L1) C:\CODE\SAMPLE.C
SAMPLE1.OBJ: C:\CODE\SAMPLE1.C
CL $(L1) C:\CODE\SAMPLE1.C
SAMPLEA.OBJ: C:\CODE\SAMPLEA.ASM
MASM $(L2) C:\CODE\SAMPLEA.ASM ;
Notice the semi-colon (;) at the end of the command line in the assembler
action block. This was placed there by the SUPER-MAINT Editor to prevent
the assembler from stopping for responces during a build. (This is user
definable in the Setup Menu.
sample.txt: placebo
COPY $(CPY) SAMPLE.TXT
The above action block deserves special notice for several reasons. It
is an example of an action block you might put in manually (the SUPER
MAKE Editor does not generate action blocks using DOS commands).
1. It uses a DOS command on the action line. SUPER-MAINT
supports these DOS commands (cd, chdir, chkdsk, cls, comp,
copy, del, dir, diskcomp, diskcopy, fc, find, format, mem,
mkdir, md, print, ren, remdir, rd, xcopy).
2. A Placebo has been used for the dependent. This is any
word that doesn't represent an actual file. This allows
SUPER-MAINT to execute the command on the second line of the
action block. The first line of an action block MUST ALWAYS
have a target and a dependent. The target is the file to be
created, the dependent is the file(s) it is created from. You
may always use a placebo for the dependent. If you do the
command line will ALWAYS be executed, each time you make your
program.
3. No path was specified for the dependent. SUPER-MAINT will
look for the dependent in the current (default) directory.
4. The target is not an object file, or an .exe, .com, or .bat
file. SUPER-MAINT generates a message that it doesn't know where
you want the target file, and that it is putting it in the
current (default) directory.
5. A user defined macro has been used (CPY). The other way to
do this would be to put the whole command right on the command
line. Example -- copy sample.c+sample1.c sample.txt
Either method is acceptable. By the way you can add commands
directly to the command line on command lines that use macro
sets such as (L1). Just type them after the (L) macro. You can
also put user defined macros there if you want. The only limit
is that the whole command line, including whatever is contained in
macros may not exceed 128 characters.
sample.txt: c:\code\sample.c c:\code\sample1.c c:\code\samplea.asm
COPY $(CPY) SAMPLE.TXT
Here's the same action block without the placebo. Notice the multiple
dependents. SUPER-MAINT can handle up to 18 dependents in an action block
(if there's room for them on a line).
SAMPLE.EXE: $(TNAMES)
LINK $(LN) @SAMPLE.LNK
Action blocks MUST be two lines with no blank lines in between them, as
shown above.
As you can see there is no special format for Notes except that they
must not have the format of a macro or a target/dependent line. The
only trouble with using a LOT of notes is that it slows down the working
of SUPER-MAINT (although in my tests on an 80386/16 I haven't noticed
any real difference in time. I have been using this file for testing
and you will agree it is quite verbose!). So the rules for notes are-
Always put notes on their own line in the file. For
clarity's sake skip a line between notes and macros or
action blocks.
Never use symbols in notes that are used in macros or
action blocks (equal sign, colon, dollar sign, etc).
Be sparing with your notes.